import { ecs } from "db://oops-framework/libs/ecs/ECS";
import { Leader } from "../Leader";
import { LeaderModelLevelComp } from "../model/LeaderModelLevelComp";

/**
 * 角色升级
 */
@ecs.register('LeaderUpgrade')
export class LeaderUpgradeComp extends ecs.Comp {
    /** 当前等级 */
    lv: number = 0;

    /** 升级等级 */
    addLv: number = 1;

    /** 0:设置默认等级，1:升级, 2:升阶 */
    type: number = 0;

    reset() {
        this.lv = 1;
        this.addLv = 1;
        this.type = 0;
    }
}
export class LeaderUpgradeSystem extends ecs.ComblockSystem implements ecs.IEntityEnterSystem {
    filter(): ecs.IMatcher {
        return ecs.allOf(LeaderUpgradeComp, LeaderModelLevelComp);
    }

    entityEnter(e: Leader): void {
    }
}